package com.example.demo.mathtest;

import java.util.Objects;

public class TM {
    private int type;           //题型
    private String formula;    //算式
    private String answer;      //计算题答案
    private int option;       //选择题答案
    private String ans_usr;   //用户计算题回答
    private int opt_usr;    //用户选择题回答

    public int getOption() {
        return option;
    }

    public int getType() {
        return type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TM tm = (TM) o;
        return type == tm.type && option == tm.option && opt_usr == tm.opt_usr && formula.equals(tm.formula) && answer.equals(tm.answer) && Objects.equals(ans_usr, tm.ans_usr);
    }

    @Override
    public int hashCode() {
        return Objects.hash(type, formula, answer, option, ans_usr, opt_usr);
    }

    public int getOpt_usr() {
        return opt_usr;
    }

    public void setOpt_usr(int opt_usr) {
        this.opt_usr = opt_usr;
    }

    public void setType(int type) {
        this.type = type;
    }

    public void setOption(int option) {
        this.option = option;
    }

    public String getFormula() {
        return formula;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public String getAns_usr() {
        return ans_usr;
    }

    public void setAns_usr(String ans_usr) {
        this.ans_usr = ans_usr;
    }
}